/************************************************************************
                        AcademicTime.h.h - Copyright asaf

**************************************************************************/


#ifndef ACADEMICTIME_H
#define ACADEMICTIME_H
#include "../Shered/Object.h"
#include "..\Shered\GlobalFunctions.h"
#include <string>
#include <vector>
using namespace std;


/**
  * class AcademicTime
  * describes a time of academic class in a semester
  * includes the day in the week and start and end time.
  */

class AcademicTime : virtual public Object
{
public:

	// Constructors/Destructors
	//default ctor
	AcademicTime():m_Weekday(0){};
	//fill ctor
	AcademicTime (int t_StartingHour,int t_EndingHour,int t_Semester,int t_Weekday):m_StartingHour(t_StartingHour),m_EndingHour(t_EndingHour),m_Semester(t_Semester),m_Weekday(t_Weekday){}
	//empty Destructor
	virtual ~AcademicTime ( );

	//setters/getters
	void setStartingHour ( int new_var );
	void setEndingHour ( int new_var );
	void setSemester ( int new_var );
	void setWeekday ( int new_var );
	int getWeekday ( );
	const int getWeekday ( )const;
	int getStartingHour ( );
	const int getStartingHour ( )const;
	int getEndingHour ( );
	const int getEndingHour ( )const;
	int getSemester ( );
	const int getSemester ( )const;

	//check if this time is overlapped by another time.
	bool isAcademicTimeOverlapping(const AcademicTime &time);
	bool isAcademicTimeOverlapping(int startHour,int endHour,int semester,int weekday);

	//is not initialized
	const bool isEmpty()const;
protected:
private:
		//start hour of class
		int m_StartingHour;
		//end hour of class
		int m_EndingHour;
		//class's semester
		int m_Semester;
		//day of the week of class
		int m_Weekday;
};

#endif // ACADEMICTIME_H
